<!--项目管理-->
<template>
    <div class="main-wrapper itemManage-wrapper">
        <div class="page-header">
            <div class="clearfix title-box">
                <span class="fl fz20">申报录入</span>
                <div class="fr clearfix icon-box">
                    <img class="mr20 fl cursor_p" :src="hoverIndex != index ? img.icon : img.iconActive"
                         v-for="(img, index) in imgList" :key="img.id" @mouseenter="mouseEnter(index)"
                         @mouseleave="mouseLeave(-1)" @click="iconClick(img.id)">
                    <el-button class="add-btn" icon="el-icon-plus" @click="creatNew">申报</el-button>
                </div>
            </div>
        </div>
        <div class="main-content p20 w1200 m20">
            <div class="content-box">
                <div class="table-box">
                    <template>
                        <el-table class="" border ref="multipleTable" :data="tableData1" tooltip-effect="dark"
                                  style="width: 100%" max-height="500px">
                            <el-table-column align="center" type="index" label="序号" width="60"></el-table-column>
                            <el-table-column align="center" prop="itemName" label="项目名称" >
                            </el-table-column>
                            <el-table-column align="center" prop="itemType" label="项目类型" >
                            </el-table-column>
                            <el-table-column align="center" prop="declarant" label="申报人" >
                            </el-table-column>
                            <el-table-column align="center" prop="declarationDepartment" label="申报部门" >
                            </el-table-column>
                            <el-table-column align="center" prop="declarationTime" label="申请时间"  >
                            </el-table-column>
                            <el-table-column align="center" label="操作">
                             	<template slot-scope="scope">
							        <el-button size="mini" @click="handleRow(scope.row)">编辑</el-button>
							        <el-button size="mini" @click="iconClick()">删除</el-button>
						        </template>
                            </el-table-column>
                        </el-table>
                    </template>
                </div>
            </div>
        </div>
        <!--新增记录-->
        <el-dialog class="dialog-box" title="新增申报" :visible.sync="createDialogVisible" width="680px">
            <div class="dialog-main detail-dialog create-asset">
                <div class="base-detail">
                    <el-form ref="form" :model="newRecordForm" label-width="86px">
                    	<el-form-item label="项目名称" class="w220">
                            <el-input v-model="newRecordForm.itemName"></el-input>
                        </el-form-item>
                        <el-form-item label="项目类型" class="w220">
                            <el-select v-model="newRecordForm.itemType">
                                <el-option label="工程" value="工程"></el-option>
                                <el-option label="服务" value="服务"></el-option>
                            </el-select>
                        </el-form-item>
                        
                        <el-form-item label="申报人" class="w220">
                            <el-input v-model="newRecordForm.declarant"></el-input>
                        </el-form-item>
                        <el-form-item label="申报部门" class="w220">
                            <el-select v-model="newRecordForm.declarationDepartment">
                                <el-option label="工程部" value="工程部"></el-option>
                                <el-option label="维修部" value="维修部"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="申请时间" class="w220">
                            <el-date-picker
                                    v-model="newRecordForm.declarationTime"
                                    type="date"
                                    placeholder="选择日期"
                                    value-format="yyyy-MM-dd"
                                    >
                            </el-date-picker>
                        </el-form-item>
                    </el-form>
                    <div class="dialog-footer">
                        <el-button @click="createDialogVisible = false">取消</el-button>
                        <el-button type="primary" @click="createDialog()">确定
                        </el-button>
                    </div>
                </div>

            </div>
        </el-dialog>
        <!--详情-->
        <el-dialog class="dialog-box" title="修改申报" :visible.sync="detailDialogVisible" width="680px">
            <div class="dialog-main detail-dialog modify">
                <div class="base-detail">
                    <el-form ref="form" :model="rowValueForm" label-width="86px">
                    	<el-form-item label="项目名称" class="w220">
                            <el-input v-model="rowValueForm.itemName"></el-input>
                        </el-form-item>
                        <el-form-item label="项目类型" class="w220">
                            <el-select v-model="rowValueForm.itemType">
                                <el-option label="工程" value="工程"></el-option>
                                <el-option label="服务" value="服务"></el-option>
                            </el-select>
                        </el-form-item>
                        
                        <el-form-item label="申报人" class="w220">
                            <el-input v-model="rowValueForm.declarant"></el-input>
                        </el-form-item>
                        <el-form-item label="申报部门" class="w220">
                            <el-select v-model="rowValueForm.declarationDepartment">
                                <el-option label="工程部" value="工程部"></el-option>
                                <el-option label="维修部" value="维修部"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="申请时间" class="w220">
                            <el-date-picker
                                    v-model="rowValueForm.declarationTime"
                                    type="date"
                                    placeholder="选择日期"
                                    value-format="yyyy-MM-dd"
                                    >
                            </el-date-picker>
                        </el-form-item>
                    </el-form>
                	<div class="dialog-footer">
                		<el-button @click="detailDialogVisible = false">取消</el-button>
                        <el-button type="primary" @click="detailDialogVisible = false">修改
                        </el-button>
                	</div>
                </div>
            </div>
        </el-dialog>
    </div>
</template>

<script src="./declarationEntry.js"></script>

<style scoped lang="scss">
@import "declarationEntry";
</style>
